package models.connection;

import org.codehaus.jackson.node.ObjectNode;
import play.libs.Json;

/**
 * Created with IntelliJ IDEA.
 * User: chlemke
 * Date: 17.01.14
 * Time: 22:42
 * To change this template use File | Settings | File Templates.
 */
public class GameException {
    private Exception e;

    public GameException(Exception exception) {
        this.e = exception;
    }

    public ObjectNode getJson(){
        ObjectNode event = Json.newObject();
        event.put("kind", "GameException");
        event.put("message", e.getMessage());

        return event;
    }
}
